<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
      <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%" >
          <input type="hidden" name="hdid" id="hdid"  value="${data.hdid}"/>
	     	<tr>
				<td class="table-header" colspan="4">社团活动</td>
			</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">社团名称:</td>
					<td class="table-contentTD" style="width: 35%">
				     	  <select id="stid" name="stid" class="selectList"  disabled="disabled">
					         <option value="">全部</option>
					         <c:forEach items="${liststmc}" var="data">
							      <option value="${data.stid}">${data.stmc}</option>
						     </c:forEach>
						  </select>     
					</td>
			
			      <td class="table-titleTD" style="width: 15%">活动名称:</td>
				  <td class="table-contentTD">${data.hdmc}</td>
				  </tr>
			<tr>
			    <td class="table-titleTD" style="width: 15%">活动日期:</td>
			    <td class="table-contentTD"><fmt:formatDate value="${data.hdrq}" pattern="yyyy-MM-dd"/> </td>
				</td>
				
                <td class="table-titleTD" style="width: 15%">活动时间:</td>
			    <td class="table-contentTD">${data.hdsj}</td>
				</td>
			</tr>
		    <tr>
			     <td class="table-titleTD" style="width: 15%">活动地点:</td>
				 <td class="table-contentTD">${data.hddd}</td>
					
				 <td class="table-titleTD" style="width: 15%">状态：</td>
					<td class="table-contentTD">
						<c:if test="${data.states==0}">未提交 </c:if>
						<c:if test="${data.states==1}">审核中 </c:if> 
						<c:if test="${data.states==2}">审核通过 </c:if>
						<c:if test="${data.states==3}">审核退回</c:if>
					</td>
			</tr>
			<tr>
			    <td class="table-titleTD" style="width: 15%">申请人:</td>
			    <td class="table-contentTD">${data.creatorname}</td>
			    <td class="table-titleTD" style="width: 15%">申请时间:</td>
			    <td class="table-contentTD"><fmt:formatDate value="${data.createtime}" pattern="yyyy-MM-dd HH:mm"/></td>
			</tr>
			<tr>
				<td class="table-titleTD">活动内容:</td>
				<td class="table-contentTD" colspan="3">${data.hdnr}</td>
			</tr>
			<tr>
				<td class="table-titleTD">备注:</td>
				<td class="table-contentTD" colspan="3">${data.remark}</td>
			 </tr>
			
		</table>
		</form>
		<br />
		<c:if test="${data.states!=0}">
		    <form action="#" name="Form2" id="Form2" method="post">
				<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
					<tr>
						 <td class="table-header" colspan="4" >审批结果</td>
					</tr>
					<tr>
					    <td class="table-titleTD" style="width: 15%">审批人:</td>
						<td class="table-contentTD" style="width: 35%">${data.auditorname}</td>
					    <td class="table-titleTD" style="width: 15%">审批时间:</td>
						<td class="table-contentTD"><fmt:formatDate value="${data.audittime}" pattern="yyyy-MM-dd HH:mm"/></td>
					</tr>
					</tr>	
						<td class="table-titleTD"  style="width: 15%">审批意见:</td>
						<td class="table-contentTD" colspan="3">${data.auditsuggestion}</td>
					</tr>
				</table>
				</form>
				<br/>
		</c:if>
			
		<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			    <c:if test="${data.states==0  or data.states==3}">
			            <td><input type="button" id="btnSubmit" class="inputButton" style="text-align: center;" value="提交" autocomplete="off"  /></td>
			            <td><input type="button" id="btnSave" class="inputButton" style="text-align: center;" value="修改" autocomplete="off"   /></td>
				</c:if>
				<td><input type="button" id="returnBut"  class="inputButton" value="返回"  style="text-align: center;" autocomplete="off"  /></td>
			</tr>
		</table>
		<script>
			$(document).ready(function() {
				  $("#btnSave").click(function() {
					   window.location.href ="${basePath}/twglStudentCorpActivity/updateToview?id="+ $("#hdid").val();
		 		  });
				  
				  $("#btnSubmit").click(function() {
				       window.location.href ="${basePath}/twglStudentCorpActivity/btnSubmit?id="+ $("#hdid").val();
			 	  });
				
				  $("#returnBut").click(function() {
		 			 window.location.href='${basePath}/twglStudentCorpActivity/index';
		 		  });
			});
 			$("#stid").val("${data.stid}");
	</script>
</body>
</html>
